package watercups.states;

import java.util.ArrayList;
import templates.State;

public class WaterCupState {
	
	protected int capacity1;
	protected int capacity2;

	WaterCupState(){
	capacity1=0;
	capacity2=0;
}

	public WaterCupState(int c1,int c2){
	capacity1=c1;
	capacity2=c2;
	
}

	public int getCapacity1() {
	return capacity1;
}

	public void setCapacity1(int capacity1) {
	this.capacity1 = capacity1;
}

	public int getCapacity2() {
	return capacity2;
}

	public void setCapacity2(int capacity2) {
	this.capacity2 = capacity2;
}

	public String toString(){
	return " Capacitatea primei cani este " + capacity1 + ", iar capacitatea celei de-a doua cani este "
+ capacity2;
}

	public boolean equals(WaterCupState a, WaterCupState b){
	if((a.getCapacity1()==b.getCapacity1())&&(a.getCapacity2()==b.getCapacity2()))
		return true;
	else
		return false;
}

	public static ArrayList<State<WaterCupState>> fStates(){
	ArrayList<State<WaterCupState>> fStates=new ArrayList<State<WaterCupState>>();
	fStates.add(new State<WaterCupState>(new WaterCupState(0,2),null));
	fStates.add(new State<WaterCupState>(new WaterCupState(1,2),null));
	fStates.add(new State<WaterCupState>(new WaterCupState(2,2),null));
	fStates.add(new State<WaterCupState>(new WaterCupState(3,2),null));
	return fStates;
}

	public static State<WaterCupState> initialState(){
	return new State<WaterCupState>(new WaterCupState(), new InitialState());
}
}
